use super::hitls_pki_types::{HITLS_PKI_LibCtx, HITLS_X509_SignAlgParam};
use crate::bsl::bsl_types::BSL_Buffer;
use crate::crypto::crypt_eal_pkey::CRYPT_EAL_PkeyCtx;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _HITLS_X509_Csr {
    _unused: [u8; 0],
}
pub type HITLS_X509_Csr = _HITLS_X509_Csr;
unsafe extern "C" {
    pub fn HITLS_X509_CsrNew() -> *mut HITLS_X509_Csr;
}
unsafe extern "C" {
    pub fn HITLS_X509_ProviderCsrNew(
        libCtx: *mut HITLS_PKI_LibCtx,
        attrName: *const ::std::os::raw::c_char,
    ) -> *mut HITLS_X509_Csr;
}
unsafe extern "C" {
    pub fn HITLS_X509_CsrFree(csr: *mut HITLS_X509_Csr);
}
unsafe extern "C" {
    pub fn HITLS_X509_CsrSign(
        mdId: i32,
        prvKey: *const CRYPT_EAL_PkeyCtx,
        algParam: *const HITLS_X509_SignAlgParam,
        csr: *mut HITLS_X509_Csr,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_X509_CsrGenBuff(
        format: i32,
        csr: *mut HITLS_X509_Csr,
        buff: *mut BSL_Buffer,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_X509_CsrGenFile(
        format: i32,
        csr: *mut HITLS_X509_Csr,
        path: *const ::std::os::raw::c_char,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_X509_CsrCtrl(
        csr: *mut HITLS_X509_Csr,
        cmd: i32,
        val: *mut ::std::os::raw::c_void,
        valLen: u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_X509_CsrParseBuff(
        format: i32,
        encode: *const BSL_Buffer,
        csr: *mut *mut HITLS_X509_Csr,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_X509_CsrParseFile(
        format: i32,
        path: *const ::std::os::raw::c_char,
        csr: *mut *mut HITLS_X509_Csr,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_X509_CsrVerify(csr: *mut HITLS_X509_Csr) -> i32;
}
